.class Lcom/waiqin365/lightapp/visit/go;
.super Landroid/os/Handler;


# instance fields
.field final synthetic a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;


# direct methods
.method constructor <init>(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-direct {p0}, Landroid/os/Handler;-><init>()V

    return-void
.end method


# virtual methods
.method public handleMessage(Landroid/os/Message;)V
    .locals 6

    const/16 v4, 0x8

    const/4 v5, 0x0

    invoke-super {p0, p1}, Landroid/os/Handler;->handleMessage(Landroid/os/Message;)V

    iget v0, p1, Landroid/os/Message;->what:I

    packed-switch v0, :pswitch_data_0

    :cond_0
    :goto_0
    return-void

    :pswitch_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->b(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)I

    iget-object v0, p1, Landroid/os/Message;->obj:Ljava/lang/Object;

    check-cast v0, Lcom/waiqin365/lightapp/visit/a/a/bg;

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->c(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Lcom/waiqin365/lightapp/view/NoNetView;

    move-result-object v1

    invoke-virtual {v1, v4}, Lcom/waiqin365/lightapp/view/NoNetView;->setVisibility(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->d(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->e(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v5}, Landroid/widget/LinearLayout;->setVisibility(I)V

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/visit/a/a/bg;->b()Z

    move-result v1

    if-eqz v1, :cond_4

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->dismissProgressDialog()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->f(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Ljava/util/ArrayList;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    const v2, 0x7f08082a

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    iget-object v3, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v3, v3, Lcom/waiqin365/lightapp/visit/b/bv;->d:Ljava/lang/String;

    aput-object v3, v2, v5

    invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    iget-object v2, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v2, v2, Lcom/waiqin365/lightapp/visit/b/bv;->d:Ljava/lang/String;

    const-string/jumbo v3, "#ff9008"

    invoke-static {v3}, Landroid/graphics/Color;->parseColor(Ljava/lang/String;)I

    move-result v3

    invoke-static {v1, v2, v3}, Lcom/waiqin365/lightapp/dailyreport/util/a;->a(Ljava/lang/CharSequence;Ljava/lang/CharSequence;I)Landroid/text/SpannableStringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->g(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/TextView;

    move-result-object v2

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->h(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/content/Context;

    move-result-object v1

    const-string/jumbo v2, "visit_is_can_view_all"

    iget-object v3, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v3, v3, Lcom/waiqin365/lightapp/visit/b/bv;->e:Ljava/lang/String;

    invoke-static {v1, v2, v3}, Lcom/fiberhome/gaea/client/d/a;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    iget-object v1, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/b/bv;->d:Ljava/lang/String;

    invoke-static {v1, v5}, Lcom/fiberhome/gaea/client/d/k;->a(Ljava/lang/String;I)I

    move-result v1

    if-nez v1, :cond_2

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->i(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Lcom/waiqin365/lightapp/visit/b/bo;

    move-result-object v1

    invoke-virtual {v1}, Lcom/waiqin365/lightapp/visit/b/bo;->notifyDataSetChanged()V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->e(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->d(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v5}, Landroid/widget/LinearLayout;->setVisibility(I)V

    :cond_1
    iget-object v1, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/b/bv;->f:Ljava/util/List;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->f(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Ljava/util/ArrayList;

    move-result-object v1

    iget-object v0, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v0, v0, Lcom/waiqin365/lightapp/visit/b/bv;->f:Ljava/util/List;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    iget-object v0, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v0}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->i(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Lcom/waiqin365/lightapp/visit/b/bo;

    move-result-object v0

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/visit/b/bo;->notifyDataSetChanged()V

    goto/16 :goto_0

    :cond_2
    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->e(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v5}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->d(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v1, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v1, v1, Lcom/waiqin365/lightapp/visit/b/bv;->f:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_3
    :goto_1
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/waiqin365/lightapp/visit/b/bn;

    iget-object v2, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v2}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->h(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/content/Context;

    move-result-object v2

    invoke-static {v2}, Lcom/waiqin365/base/db/offlinedata/d;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/d;

    move-result-object v2

    iget-object v4, v1, Lcom/waiqin365/lightapp/visit/b/bn;->h:Ljava/lang/String;

    invoke-virtual {v2, v4}, Lcom/waiqin365/base/db/offlinedata/d;->d(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v2

    if-eqz v2, :cond_3

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-lez v4, :cond_3

    invoke-virtual {v2, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/waiqin365/lightapp/kehu/b/am;

    invoke-virtual {v1, v2}, Lcom/waiqin365/lightapp/visit/b/bn;->a(Lcom/waiqin365/lightapp/kehu/b/am;)V

    goto :goto_1

    :cond_4
    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->e(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->d(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Landroid/widget/LinearLayout;

    move-result-object v1

    invoke-virtual {v1, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->c(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Lcom/waiqin365/lightapp/view/NoNetView;

    move-result-object v1

    invoke-virtual {v1, v5}, Lcom/waiqin365/lightapp/view/NoNetView;->setVisibility(I)V

    const/4 v2, 0x0

    iget-object v1, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    if-eqz v1, :cond_5

    iget-object v1, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->b:Lcom/waiqin365/lightapp/visit/b/bv;

    iget-object v2, v1, Lcom/waiqin365/lightapp/visit/b/bv;->b:Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->c(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Lcom/waiqin365/lightapp/view/NoNetView;

    move-result-object v1

    iget-object v3, v1, Lcom/waiqin365/lightapp/view/NoNetView;->a:Landroid/widget/TextView;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_8

    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    const v4, 0x7f08058e

    invoke-virtual {v1, v4}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    :goto_2
    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    :cond_5
    if-eqz v2, :cond_6

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_7

    :cond_6
    iget-object v1, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-static {v1}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->c(Lcom/waiqin365/lightapp/visit/VisitManagerActivity;)Lcom/waiqin365/lightapp/view/NoNetView;

    move-result-object v1

    iget v0, v0, Lcom/waiqin365/lightapp/visit/a/a/bg;->a:I

    invoke-virtual {v1, v0}, Lcom/waiqin365/lightapp/view/NoNetView;->a(I)V

    :cond_7
    iget-object v0, p0, Lcom/waiqin365/lightapp/visit/go;->a:Lcom/waiqin365/lightapp/visit/VisitManagerActivity;

    invoke-virtual {v0}, Lcom/waiqin365/lightapp/visit/VisitManagerActivity;->dismissProgressDialog()V

    goto/16 :goto_0

    :cond_8
    move-object v1, v2

    goto :goto_2

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
    .end packed-switch
.end method
